package com.lingshu.app.config;

public class DefaultConfig {
    private static volatile DefaultConfig instance;
    private String authHost;
    private String apiHost;
    private String websocketHost;
    private String mqHost;
    private Integer mqPort;
    private String mqUsername;
    private String mqPassword;

    public static void setInstance(DefaultConfig instance) {
        DefaultConfig.instance = instance;
    }

    public String getAuthHost() {
        return authHost;
    }

    public void setAuthHost(String authHost) {
        this.authHost = authHost;
    }

    public String getApiHost() {
        return apiHost;
    }

    public void setApiHost(String apiHost) {
        this.apiHost = apiHost;
    }

    public String getWebsocketHost() {
        return websocketHost;
    }

    public void setWebsocketHost(String websocketHost) {
        this.websocketHost = websocketHost;
    }

    public String getMqHost() {
        return mqHost;
    }

    public void setMqHost(String mqHost) {
        this.mqHost = mqHost;
    }

    public Integer getMqPort() {
        return mqPort;
    }

    public void setMqPort(Integer mqPort) {
        this.mqPort = mqPort;
    }

    public String getMqUsername() {
        return mqUsername;
    }

    public void setMqUsername(String mqUsername) {
        this.mqUsername = mqUsername;
    }

    public String getMqPassword() {
        return mqPassword;
    }

    public void setMqPassword(String mqPassword) {
        this.mqPassword = mqPassword;
    }

    public String getMqVirtualHost() {
        return mqVirtualHost;
    }

    public void setMqVirtualHost(String mqVirtualHost) {
        this.mqVirtualHost = mqVirtualHost;
    }

    private String mqVirtualHost;

    private DefaultConfig() {
    }

    public static DefaultConfig getInstance() {
        if (instance == null) {
            synchronized (DefaultConfig.class) {
                if (instance == null) {
                    instance = new DefaultConfig();
                }
            }
        }
        return instance;
    }
}
